﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace HelpDesk
{
    public partial class Principal : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                Session.Clear();
                Response.Redirect("Login.aspx");
            }

            QueryBuilder Consulta = new QueryBuilder();
            DataTable permisos = Consulta.EjecutarQuery("Select permisos from usuario where id_usuario = '" + Session["Usuario"] + "'");
            if (permisos.Rows[0].ItemArray[0].ToString() == "3")
            {
                estad.Visible = false;
                Workflow.Visible = false;
                admin.Visible = false;
                config.Visible = false;
            }
        }

    }
}
